package com.dapangdong.consumer.controller;

import com.dapangdong.consumer.client.ProviderClient;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: SpringCloud-demo
 * @author: daPangDong
 * @create: 2022-05-12 20:21
 */
@RestController
@RequiredArgsConstructor
public class ConsumerController {

    private final ProviderClient providerClient;

    @GetMapping("/hi-feign")
    public String hiFeign(){
        return String.format("【%s】  +  %s",System.currentTimeMillis(),providerClient.hi(null));
    }
}